fix: Actually documenting the change from 'OnIsServerAuthoritatitive' to 'OnIsServerAuthoritative' in NetworkTransform#2039
Closed
11BelowStudio wants to merge 5 commits intoUnity-Technologies:developfrom
11BelowStudio:patch-2
Closed
fix: Actually documenting the change from 'OnIsServerAuthoritatitive' to 'OnIsServerAuthoritative' in NetworkTransform#203911BelowStudio wants to merge 5 commits intoUnity-Technologies:developfrom 11BelowStudio:patch-2
11BelowStudio wants to merge 5 commits intoUnity-Technologies:developfrom
11BelowStudio:patch-2
Conversation
actually making the old obsolete OnIsServerAuthoritatitive() not virtual and also throw an exception when called, just to make it abundantly clear to anyone who may be tempted to call/override it anyway that they shouldn't be doing that.
jeffreyrainy
added a commit
that referenced
this pull request
Jun 23, 2022
Contributor
|
since we weren't fully released, we weren't API-stable. there may or may not be pre.11 soon, I think we will not get an obsolete API back in now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documenting #2006, and I've re-added
NetworkTransform.OnIsServerAuthoritatitive()but with an 'Obsolete' tag on it, so people know to useNetworkTransform.OnIsServerAuthoritative()instead, and this time it's actually mentioned in the changelog.It'll probably be safe to remove the obsolete
NetworkTransform.OnIsServerAuthoritatitive()entirely in pre-11, but in the meantime this explicitly tells users to not use it, giving them an opportunity to fix their code to not use it.This is to prevent further instances of #2037.
Changelog
NetworkTransform.OnIsServerAuthoritatitive()so it can be marked as obsolete, to avoid unexpected cryptic compiler errors due to the sudden lack of that method (such as Pre 10 ClientNetworkTransform error #2037).NetworkTransform. The old method is only still here so things that still override that method get given an error message.NetworkTransform.OnIsServerAuthoritatitive()has been replaced byNetworkTransform.OnIsServerAuthoritative().NetworkTransform.OnIsServerAuthoritatitive()is obsolete (due to a typo in method name). Please useNetworkTransform.OnIsServerAuthoritative()instead.Testing and Documentation
Deprecated API
[Obsolete]attribute was addedalong with a(RemovedAfter yyyy-mm-dd)entry.